package com.wgz.medicalmanagement.domain.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.Data;

/**
 * 角色实体类
 * 
 * @author medical
 * @since 2023-05-29
 */
@Data
@Entity
@Table(name = "roles")
@TableName("roles")
public class Role implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 角色名称
     */
    @Column(name = "role_name", nullable = false, unique = true)
    @TableField("role_name")
    private String roleName;

    /**
     * 描述
     */
    @Column(name = "description")
    @TableField("description")
    private String description;

    /**
     * 创建时间
     */
    @Column(name = "created_time")
    @TableField("created_time")
    private LocalDateTime createdTime;

    /**
     * 更新时间
     */
    @Column(name = "updated_time")
    @TableField("updated_time")
    private LocalDateTime updatedTime;

    /**
     * 是否删除(0:否,1:是)
     */
    @Column(name = "deleted")
    @TableField("deleted")
    @TableLogic
    private Integer deleted;
} 